package org.fin.session;

import org.fin.pojo.MappedStatement;

import java.sql.SQLException;
import java.util.List;

public interface SqlSession {

  <R> List<R> selectList(MappedStatement statement, Object... params) throws Exception;

  <R> R selectOne(MappedStatement statement, Object... params) throws Exception;

  <P> P getMapper(Class<P> proxyTargetCls);

  void update(MappedStatement statement, Object... params) throws SQLException;

  void delete(MappedStatement statement, Object... params) throws SQLException;

  void insert(MappedStatement statement, Object... params) throws SQLException;
}
